/*
    XTU OJ: 1319
    by: fifth_light
*/

#define MOD 1000000007

#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>

int main(void) {
    int prime_table[100050] = {1, 1, 0};
    for (int i = 2; i < 317; (i == 2) ? (i++) : (i += 2)) {
        for (int j = i * 2; j < 100050; j += i) {
            prime_table[j] = 1;
        }
    }
    
    int prime_count = 0;
    int primes[100050] = {0};
    for (int i = 2; i < 100050; i++) {
        if (prime_table[i] == 0) {
            primes[prime_count++] = i;
        }
    }

    int t;
    scanf("%d", &t);
    for(int i = 0; i < t; i++) {
        int n;
        scanf("%d", &n);
        int max_num = 0;
        int nums[100050] = {0};
        for (int j = 0; j < n; j++) {
            int a;
            scanf("%d", &a);
            for (int i = 0; i < prime_count; i++) {
                int prime = primes[i];
                while (a % prime == 0) {
                    a /= prime;
                    nums[i]++;
                    if (max_num < i) {
                        max_num = i;
                    }
                    if (a == 1) {
                        goto next_num;
                    }
                }
            }
            next_num:;
        }
        int64_t result = 1;
        for (int i = 0; i <= max_num; i++) {
            // int prime = primes[i];
            if (nums[i] != 0) {
                result *= nums[i] + 1;
                result %= MOD;
                // printf("table[%d]: %d\n", prime, nums[i]);
            }
        }
        printf("%" PRId64 "\n", result);
    }
    return 0;
}
